<%--
  Created by IntelliJ IDEA.
  User: kkk
  Date: 2022/8/18
  Time: 20:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery.js"></script>
    <base href="${pageContext.request.contextPath}/">
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <style>
        tr:first-child{
            background-color: aqua;
        }
        tr:nth-child(even){
            background-color: lightblue;
        }
        th,td{
            border: 1px steelblue solid ;
            text-align: center;
        }
    </style>
</head>
<body>
<form action="ListServlet">
    品种
    <select name="breed" id="">
        <option value="0">--请选择--</option>
        <option value="1">狗</option>
        <option value="2">猫</option>
        <option value="3">鸟</option>
        <option value="4">兔</option>
    </select>
    <input type="submit" value="查询">
    <a href="add.jsp">新增宠物</a>
</form>
<table>
    <tr>
        <th>宠物昵称</th>
        <th>出生日期</th>
        <th>性别</th>
    </tr>
    <c:forEach var="pet" items="${list}">
        <tr>
            <td>${pet.petName}</td>
            <td>${pet.birthday}</td>
            <td>${pet.petSex==1?"雄":"雌"}</td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
